package com.ssrs.platform;

import com.ssrs.framework.FrameworkPlugin;
import com.ssrs.framework.extend.annotation.Plugin;
import com.ssrs.framework.extend.annotation.PluginRequired;
import com.ssrs.framework.extend.plugin.AbstractPlugin;
import com.ssrs.framework.extend.plugin.PluginException;
import com.ssrs.framework.i18n.LangUtil;
import com.ssrs.platform.util.PlatformUtil;

/**
 * @author ssrs
 */
@Plugin(name = "基础平台",
        author = "ssrs",
        provider = "ssrs",
        version = "2.0",
        description = "PlatformPlugin",
        required = {
                @PluginRequired(required = FrameworkPlugin.class, version = "2.0")
        }
)
public class PlatformPlugin extends AbstractPlugin {

    @Override
    public void start() throws PluginException {
        // 加载数据库中的配置项
        PlatformUtil.loadDBConfig();
        // 加载数据库定时任务
        PlatformUtil.loadDBSchedule();
        // 加载数据库中的国际化资源
        PlatformUtil.loadDBI18n();
    }

    @Override
    public void stop() throws PluginException {

    }
}
